<template>
	<view class="whole" :class="theme+'-bg-middle'">

		<scroll-view scroll-y="true" style="height: 100%;">
			<view class="linkBox">
				<view class="link br-1" :class="theme+'-bg-bbox'" v-for="(item,index) in list" :key="item.id"
					@click="go(item.url)" @longpress="link">
					<text :class="theme+'-ftext-color'">{{locale == 'en' ? item.english : item.title}}</text>
				</view>
			</view>
		</scroll-view>

	</view>
</template>

<script>
	// 全部应用页面
	export default {
		data() {
			return {
				list: [],
			}
		},
		onLoad() {
			this.$theme()

			this.$get('/tool/list').then(res => this.list = res.data)
		},
		methods: {
			retu() {
				uni.navigateBack()
			},
			link() {
				uni.navigateTo({
					url: '../../home/add-collection/AddCollection'
				})
			},
			go(link) {
				uni.navigateTo({
					url: link
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.whole /deep/ {
		height: 100%;

		.uni-icons {
			font-size: 40rpx;
		}

		.linkBox {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			justify-content: space-between;

			.link {
				width: 334rpx;
				height: 82rpx;
				font-size: 26rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				margin: 20rpx;
				cursor: pointer;


				text {
					cursor: pointer;
				}
			}
		}
	}
</style>
